package com.codinghero.zqlb.spider.handler;

import java.util.Iterator;
import java.util.List;

import com.codinghero.zqlb.match.SoccerMatch;

public class MatchTypeFilterHandler {

	public void handle(List<SoccerMatch> list, Integer typeId) {
//		Iterator<Entry<String, Integer>> iter = SoccerMatch.FOCUSED_TYPE_MAP.entrySet().iterator();
//		Map<String, Integer> filterMap = new HashMap<String, Integer>();
//		while(iter.hasNext()) {
//			Entry<String, Integer> e = iter.next();
//			if(e.getValue().equals(typeId))
//				filterMap.put(e.getKey(), e.getValue());
//		}
		
		Iterator<SoccerMatch> matchIter = list.iterator();
		while (matchIter.hasNext()) {
			SoccerMatch match = matchIter.next();
			if (!match.getTypeId().equals(typeId))
				matchIter.remove();
		}
	}

}
